﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using NextInventory.Model.Menufacturer;

namespace NextInventory.Model.Inventory
{
    public class ProductsModel : BaseViewModel
    {
        public long ID { get; set; }

        [Required(ErrorMessage="Product name is required.")]
        [Display(Name="Name:")]
        public string Name { get; set; }

        [Display(Name="Description:")]
        public string Description { get; set; }

        [Display(Name="Expiry date:")]
        [DataType(DataType.DateTime)]
        public DateTime? ExpiryDate { get; set; }

        [Display(Name="Purchase date:")]
        [DataType(DataType.DateTime)]
        public DateTime PurchaseDate { get; set; }

        [Display(Name="Menufacturing date:")]
        [DataType(DataType.DateTime)]
        public DateTime? MenuFacturingDate { get; set; }

        [Required(ErrorMessage="Opening quantity is required.")]
        [Display(Name="Opening quantity:")]
        public int OpeningQty { get; set; }

        [Required(ErrorMessage="Opening value is required.")]
        [Display(Name="Opening value:")]
        public int OpeningValue { get; set; }

        [Required(ErrorMessage="Purchase rate is required.")]
        [Display(Name="Purchase rate:")]
        public decimal PurchaseRate { get; set; }

        [Required(ErrorMessage="Sale rate is required.")]
        [Display(Name="Sale rate:")]
        public decimal SaleRate { get; set; }

        [Required(ErrorMessage="Product category is required.")]
        [Display(Name="Category")]
        public int? CategoryId { get; set; }

        [Required(ErrorMessage="Menufacture is required.")]
        [Display(Name="Menufactured:")]
        public int MenufacturerId { get; set; }

        [Required(ErrorMessage="Product model is required.")]
        [Display(Name="Model:")]
        public long? ModelId { get; set; }


        public long? CreatedBy { get; set; }
        public DateTime? CreatedDate { get; set; }
        public long? UpdatedBy { get; set; }
        public DateTime? UpdatedDate { get; set; }
    }
}
